package com.example.supplychainbackend.controller.dto.sales;

import com.example.supplychainbackend.entity.sales.DeliverableEntity;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ContractDto {
    String contractNumber;

    String contractType;
    String contractStatus;
    String approvalStatus;
    String executionStatus;
    String contractCategory;
    String contractName;
    Integer contractAmount;
    Integer deliverableQuantity;
    String customerCode;
    String customerName;
    String signDate;
    String signatory;
    String requiredDeliveryDate;
    String businessDepartment;
    String creator;
    Integer plannedQuantity;
    Integer executedQuantity;
    Integer unexecutedQuantity;
    Integer productionQuantity;
    Integer overflowQuantity;
    Integer deliveredQuantity;
    String customer;
    Integer company;
    String salesOrganization;
    String salesChannel;
    String productGroup;
    String localCurrency;
    String originalCurrency;
    String salesArea;
    String deliveryAddress;

    @ElementCollection
    @CollectionTable(
            name = "contract_attachments",
            joinColumns = @JoinColumn(name = "cid")
    )
    @Column(name = "attachment")
    List<String> attachments;

    String externalContractNumber;
    String opportunityNumber;
    String opportunityName;
    String orderType;
    String requirements;

    @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
    @JoinColumn(name = "contract_n")
    List<DeliverableDto> deliverable;

    String bomTemplate;

    String	userName;
    String	enterpriseName;
    Boolean	onChain;
    String	transactionId;
    String	commitTime;
    String	userId;
    String	enterpriseId;

}
